<script setup lang="ts">
import { ElConfigProvider } from "element-plus";
import { computed, onMounted } from "vue";
import { useLocaleStore } from "@/store/modules/locale";
import { useAppStore } from "@/store/modules/app";
const appStore = useAppStore();
const localeStore = useLocaleStore();
const currentLocale = computed(() => localeStore.currentLocale);
const size = computed(() => appStore.getCurrentSize);
// 初始化所有主题色
onMounted(() => {  
  appStore.setCssVarTheme();
});
</script>

<template>
  <ElConfigProvider :size="size" :message="{ max: 1 }" :locale="currentLocale.elLocale">
    <slot />
  </ElConfigProvider>
</template>

<style lang="less" scoped></style>
